<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>Nordic Thingy:52 v2.2.0 : m_batt_meas.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet_offline.css" rel="stylesheet" type="text/css"/>
<link href="nordic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" width="100%" class="blank">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Nordic Semiconductor" src="nordic_small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Nordic Thingy:52 v2.2.0
   </div>
  </td>
 </tr>
 </tbody>
</table>
<script>
var url=window.location.href.split("/").reverse()[1];
var validLinks= ["nrf5","s130","s132","s212","s332"];
var index;
for (index = 0; index < validLinks.length; ++index) {
   if ( url.indexOf(validLinks[index]) !== -1 ) {
      document.getElementById(validLinks[index]).setAttribute('class', 'doclinks docselected');
   };
};
</script>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('m__batt__meas_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">m_batt_meas.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">  Copyright (c) 2010 - 2017, Nordic Semiconductor ASA</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">  All rights reserved.</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">  Redistribution and use in source and binary forms, with or without modification,</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">  are permitted provided that the following conditions are met:</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">  1. Redistributions of source code must retain the above copyright notice, this</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">     list of conditions and the following disclaimer.</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">  2. Redistributions in binary form, except as embedded into a Nordic</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">     Semiconductor ASA integrated circuit in a product or a software update for</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">     such product, must reproduce the above copyright notice, this list of</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">     conditions and the following disclaimer in the documentation and/or other</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">     materials provided with the distribution.</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">  3. Neither the name of Nordic Semiconductor ASA nor the names of its</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">     contributors may be used to endorse or promote products derived from this</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">     software without specific prior written permission.</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">  4. This software, with or without modification, must only be used with a</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">     Nordic Semiconductor ASA integrated circuit.</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">  5. Any software provided in binary form under this license must not be reverse</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">     engineered, decompiled, modified and/or disassembled.</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">  THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &quot;AS IS&quot; AND ANY EXPRESS</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment">  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment">  OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment">  DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment">  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment">  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment">  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#ifndef __M_BATT_MEAS_H__</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor">#define __M_BATT_MEAS_H__</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">#include &quot;m_ble.h&quot;</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">#include &quot;nrf_saadc.h&quot;</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">#include &lt;stdbool.h&gt;</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor">#define MEAS_INTERVAL_LOW_LIMIT_MS 50</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="comment">/* The SAADC is configured for oversampling for improved noise immunity.</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="comment">corresponding settings can be found in sdk_config.h */</span></div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="keyword">enum</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;{</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="group__m__batt__meas.html#gga0411cd49bb5b71852cecd93bcbf0ca2dac55c4d013f9842ae8b8a145adcbe4d7e">   64</a></span>&#160;    <a class="code" href="group__m__batt__meas.html#gga0411cd49bb5b71852cecd93bcbf0ca2dac55c4d013f9842ae8b8a145adcbe4d7e">M_BATT_STATUS_CODE_SUCCESS</a>,                     </div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="group__m__batt__meas.html#gga0411cd49bb5b71852cecd93bcbf0ca2da1136981cfa14273fe5bd47a316b31ebe">   65</a></span>&#160;    <a class="code" href="group__m__batt__meas.html#gga0411cd49bb5b71852cecd93bcbf0ca2da1136981cfa14273fe5bd47a316b31ebe">M_BATT_STATUS_CODE_INVALID_PARAM</a>,               </div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;};</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="group__m__batt__meas.html#ga97242e505dbdc2ee7827cc0db746ffca">   70</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;{</div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa4ad836450107533f4c095e501705930d">   72</a></span>&#160;    <a class="code" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa4ad836450107533f4c095e501705930d">M_BATT_MEAS_EVENT_DATA</a>,                         </div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa174cab8a06de89889f665d06608f9cca">   73</a></span>&#160;    <a class="code" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa174cab8a06de89889f665d06608f9cca">M_BATT_MEAS_EVENT_LOW</a>,                          </div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaac213288e1593fe9f62cfb26bf4e63efe">   74</a></span>&#160;    <a class="code" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaac213288e1593fe9f62cfb26bf4e63efe">M_BATT_MEAS_EVENT_FULL</a>,                         </div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa1ecb97dce4fbd6d2e90f0c457f93d333">   75</a></span>&#160;    <a class="code" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa1ecb97dce4fbd6d2e90f0c457f93d333">M_BATT_MEAS_EVENT_USB_CONN_CHARGING</a>,            </div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa35441adf890d9265370bcb429a3bc52b">   76</a></span>&#160;    <a class="code" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa35441adf890d9265370bcb429a3bc52b">M_BATT_MEAS_EVENT_USB_CONN_CHARGING_FINISHED</a>,   </div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa85981536414e45d63d487a6f3f033cb8">   77</a></span>&#160;    <a class="code" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa85981536414e45d63d487a6f3f033cb8">M_BATT_MEAS_EVENT_USB_DISCONN</a>,                  </div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa15b80e149f891938b19c579c987fc6fe">   78</a></span>&#160;    <a class="code" href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa15b80e149f891938b19c579c987fc6fe">M_BATT_MEAS_EVENT_ERROR</a>,                        </div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;}<a class="code" href="group__m__batt__meas.html#ga97242e505dbdc2ee7827cc0db746ffca">m_batt_meas_event_type_t</a>;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="structm__batt__meas__event__t.html">   83</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;{</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="structm__batt__meas__event__t.html#a535ad3ffcec3974575eb7e08fcc8ebc2">   85</a></span>&#160;    <a class="code" href="group__m__batt__meas.html#ga97242e505dbdc2ee7827cc0db746ffca">m_batt_meas_event_type_t</a>    <a class="code" href="structm__batt__meas__event__t.html#a535ad3ffcec3974575eb7e08fcc8ebc2">type</a>;               </div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="structm__batt__meas__event__t.html#a68a8c5c913af88ed9100abd8e391ae25">   86</a></span>&#160;    uint16_t                    <a class="code" href="structm__batt__meas__event__t.html#a68a8c5c913af88ed9100abd8e391ae25">voltage_mv</a>;         </div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="structm__batt__meas__event__t.html#ab5428192b1c275fe39849bd5296bcf38">   87</a></span>&#160;    uint8_t                     <a class="code" href="structm__batt__meas__event__t.html#ab5428192b1c275fe39849bd5296bcf38">level_percent</a>;      </div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="structm__batt__meas__event__t.html#af3bba3b6ab6d11e014929bd6726e21ad">   88</a></span>&#160;    <span class="keywordtype">bool</span>                        <a class="code" href="structm__batt__meas__event__t.html#af3bba3b6ab6d11e014929bd6726e21ad">valid_voltage</a>;      </div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;}<a class="code" href="structm__batt__meas__event__t.html">m_batt_meas_event_t</a>;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="group__m__batt__meas.html#ga3a8f1eaf8376db27cdc7a87946c84c37">   93</a></span>&#160;<span class="keyword">typedef</span> void (*<a class="code" href="group__m__batt__meas.html#ga3a8f1eaf8376db27cdc7a87946c84c37">m_batt_meas_event_handler_t</a>)(<a class="code" href="structm__batt__meas__event__t.html">m_batt_meas_event_t</a> <span class="keyword">const</span> * p_event);</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="structvoltage__divider__t.html">   99</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;{</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    uint32_t r_1_ohm;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    uint32_t r_2_ohm;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;}<a class="code" href="structvoltage__divider__t.html">voltage_divider_t</a>;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="structstate__of__charge__t.html">  107</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;{</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="structstate__of__charge__t.html#a77cfde237d402d3004891f26e7023cea">  109</a></span>&#160;    uint16_t            <a class="code" href="structstate__of__charge__t.html#a77cfde237d402d3004891f26e7023cea">num_elements</a>;                   </div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="structstate__of__charge__t.html#aea6f5da870665e5460e72ba375fe1fd1">  110</a></span>&#160;    uint16_t            <a class="code" href="structstate__of__charge__t.html#aea6f5da870665e5460e72ba375fe1fd1">first_element_mv</a>;               </div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="structstate__of__charge__t.html#a3c599a3aa0d44107e3ca04d19773d32c">  111</a></span>&#160;    uint8_t             <a class="code" href="structstate__of__charge__t.html#a3c599a3aa0d44107e3ca04d19773d32c">delta_mv</a>;                       </div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="structstate__of__charge__t.html#abfc39dcdd555c9753128ba539437797c">  112</a></span>&#160;    uint8_t <span class="keyword">const</span> *     <a class="code" href="structstate__of__charge__t.html#abfc39dcdd555c9753128ba539437797c">voltage_to_soc</a>;                 </div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;}<a class="code" href="structstate__of__charge__t.html">state_of_charge_t</a>;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="structbatt__meas__param__t.html">  118</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;{</div><div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="structbatt__meas__param__t.html#a9ca8fd3a0a0041f1d51e0824463f6c43">  120</a></span>&#160;    uint16_t            <a class="code" href="structbatt__meas__param__t.html#a9ca8fd3a0a0041f1d51e0824463f6c43">app_timer_prescaler</a>;            </div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="structbatt__meas__param__t.html#a0fa6444796cc22152ae2357a9de7ae63">  121</a></span>&#160;    uint8_t             <a class="code" href="structbatt__meas__param__t.html#a0fa6444796cc22152ae2357a9de7ae63">adc_pin_no</a>;                     </div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="structbatt__meas__param__t.html#a235e3292de0a02e964849b06b8a7d704">  122</a></span>&#160;    nrf_saadc_input_t   <a class="code" href="structbatt__meas__param__t.html#a235e3292de0a02e964849b06b8a7d704">adc_pin_no_ain</a>;                 </div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="structbatt__meas__param__t.html#af749236629b2501099b6261ebe398583">  123</a></span>&#160;    uint8_t             <a class="code" href="structbatt__meas__param__t.html#af749236629b2501099b6261ebe398583">usb_detect_pin_no</a>;              </div><div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="structbatt__meas__param__t.html#aeb8fcc57a40fd7458aa6d31549577d82">  124</a></span>&#160;    uint8_t             <a class="code" href="structbatt__meas__param__t.html#aeb8fcc57a40fd7458aa6d31549577d82">batt_chg_stat_pin_no</a>;           </div><div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="structbatt__meas__param__t.html#a8fd3192d7233181b20d89f9e277a7967">  125</a></span>&#160;    <span class="keywordtype">bool</span>                <a class="code" href="structbatt__meas__param__t.html#a8fd3192d7233181b20d89f9e277a7967">batt_mon_en_pin_used</a>;           </div><div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="structbatt__meas__param__t.html#a310d12d80f4448fca30df7e26e1224a5">  126</a></span>&#160;    uint8_t             <a class="code" href="structbatt__meas__param__t.html#a310d12d80f4448fca30df7e26e1224a5">batt_mon_en_pin_no</a>;             </div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="structbatt__meas__param__t.html#af15ce3f05c8b27c32ac601445a33e110">  127</a></span>&#160;    uint16_t            <a class="code" href="structbatt__meas__param__t.html#af15ce3f05c8b27c32ac601445a33e110">batt_voltage_limit_low</a>;         </div><div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="structbatt__meas__param__t.html#a87835cef0315ba5c39c0e63ad552c5f7">  128</a></span>&#160;    uint16_t            <a class="code" href="structbatt__meas__param__t.html#a87835cef0315ba5c39c0e63ad552c5f7">batt_voltage_limit_full</a>;        </div><div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="structbatt__meas__param__t.html#a0a683f9a8f5bd335a207c556002b8e29">  129</a></span>&#160;    <a class="code" href="structvoltage__divider__t.html">voltage_divider_t</a>   <a class="code" href="structbatt__meas__param__t.html#a0a683f9a8f5bd335a207c556002b8e29">voltage_divider</a>;                </div><div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="structbatt__meas__param__t.html#a14f6f056ef9542eb14fe43800f0cd78a">  130</a></span>&#160;    <a class="code" href="structstate__of__charge__t.html">state_of_charge_t</a>   <a class="code" href="structbatt__meas__param__t.html#a14f6f056ef9542eb14fe43800f0cd78a">state_of_charge</a>;                </div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;}<a class="code" href="structbatt__meas__param__t.html">batt_meas_param_t</a>;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="structbatt__meas__init__t.html">  135</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;{</div><div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="structbatt__meas__init__t.html#afbb4f0c97d0906f402bae57e4472cf4f">  137</a></span>&#160;    <a class="code" href="group__m__batt__meas.html#ga3a8f1eaf8376db27cdc7a87946c84c37">m_batt_meas_event_handler_t</a>     <a class="code" href="structbatt__meas__init__t.html#afbb4f0c97d0906f402bae57e4472cf4f">evt_handler</a>;        </div><div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="structbatt__meas__init__t.html#af63004d13b5db534cc11cbd0bb2723f7">  138</a></span>&#160;    <a class="code" href="structbatt__meas__param__t.html">batt_meas_param_t</a>               <a class="code" href="structbatt__meas__init__t.html#af63004d13b5db534cc11cbd0bb2723f7">batt_meas_param</a>;    </div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;}<a class="code" href="structbatt__meas__init__t.html">batt_meas_init_t</a>;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;uint32_t <a class="code" href="group__m__batt__meas.html#ga822adb8e2120c95c740d244b2bbf4709">m_batt_meas_init</a>(<a class="code" href="structm__ble__service__handle__t.html">m_ble_service_handle_t</a> * p_handle, <a class="code" href="structbatt__meas__init__t.html">batt_meas_init_t</a> <span class="keyword">const</span> * <span class="keyword">const</span> p_batt_meas_init);</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;uint32_t <a class="code" href="group__m__batt__meas.html#ga3e17a5ec6e6a7683eb0fdb578ae5388e">m_batt_meas_enable</a>(uint32_t meas_interval_ms);</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;uint32_t <a class="code" href="group__m__batt__meas.html#ga36dc9d46d92c054588f99cf2044b1087">m_batt_meas_disable</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div><div class="ttc" id="structbatt__meas__param__t_html_a0fa6444796cc22152ae2357a9de7ae63"><div class="ttname"><a href="structbatt__meas__param__t.html#a0fa6444796cc22152ae2357a9de7ae63">batt_meas_param_t::adc_pin_no</a></div><div class="ttdeci">uint8_t adc_pin_no</div><div class="ttdoc">Analog in pin connected to battery (with possible voltage divider). </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:121</div></div>
<div class="ttc" id="structbatt__meas__param__t_html_a0a683f9a8f5bd335a207c556002b8e29"><div class="ttname"><a href="structbatt__meas__param__t.html#a0a683f9a8f5bd335a207c556002b8e29">batt_meas_param_t::voltage_divider</a></div><div class="ttdeci">voltage_divider_t voltage_divider</div><div class="ttdoc">Voltage divider type containing resistor information. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:129</div></div>
<div class="ttc" id="structbatt__meas__param__t_html_af15ce3f05c8b27c32ac601445a33e110"><div class="ttname"><a href="structbatt__meas__param__t.html#af15ce3f05c8b27c32ac601445a33e110">batt_meas_param_t::batt_voltage_limit_low</a></div><div class="ttdeci">uint16_t batt_voltage_limit_low</div><div class="ttdoc">Low voltage limit [milliVolts]. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:127</div></div>
<div class="ttc" id="structbatt__meas__param__t_html_a87835cef0315ba5c39c0e63ad552c5f7"><div class="ttname"><a href="structbatt__meas__param__t.html#a87835cef0315ba5c39c0e63ad552c5f7">batt_meas_param_t::batt_voltage_limit_full</a></div><div class="ttdeci">uint16_t batt_voltage_limit_full</div><div class="ttdoc">Full voltage limit [milliVolts]. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:128</div></div>
<div class="ttc" id="structm__batt__meas__event__t_html_a68a8c5c913af88ed9100abd8e391ae25"><div class="ttname"><a href="structm__batt__meas__event__t.html#a68a8c5c913af88ed9100abd8e391ae25">m_batt_meas_event_t::voltage_mv</a></div><div class="ttdeci">uint16_t voltage_mv</div><div class="ttdoc">Battery voltage given in millivolts. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:86</div></div>
<div class="ttc" id="group__m__batt__meas_html_ga3e17a5ec6e6a7683eb0fdb578ae5388e"><div class="ttname"><a href="group__m__batt__meas.html#ga3e17a5ec6e6a7683eb0fdb578ae5388e">m_batt_meas_enable</a></div><div class="ttdeci">uint32_t m_batt_meas_enable(uint32_t meas_interval_ms)</div><div class="ttdoc">Function for enabling battery measurement at the given interval. </div></div>
<div class="ttc" id="group__m__batt__meas_html_gga0411cd49bb5b71852cecd93bcbf0ca2da1136981cfa14273fe5bd47a316b31ebe"><div class="ttname"><a href="group__m__batt__meas.html#gga0411cd49bb5b71852cecd93bcbf0ca2da1136981cfa14273fe5bd47a316b31ebe">M_BATT_STATUS_CODE_INVALID_PARAM</a></div><div class="ttdoc">Invalid parameters. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:65</div></div>
<div class="ttc" id="structbatt__meas__init__t_html_af63004d13b5db534cc11cbd0bb2723f7"><div class="ttname"><a href="structbatt__meas__init__t.html#af63004d13b5db534cc11cbd0bb2723f7">batt_meas_init_t::batt_meas_param</a></div><div class="ttdeci">batt_meas_param_t batt_meas_param</div><div class="ttdoc">Input parameters. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:138</div></div>
<div class="ttc" id="structbatt__meas__param__t_html_a9ca8fd3a0a0041f1d51e0824463f6c43"><div class="ttname"><a href="structbatt__meas__param__t.html#a9ca8fd3a0a0041f1d51e0824463f6c43">batt_meas_param_t::app_timer_prescaler</a></div><div class="ttdeci">uint16_t app_timer_prescaler</div><div class="ttdoc">App timer prescaler. See APP_TIMER_PRESCALER. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:120</div></div>
<div class="ttc" id="group__m__batt__meas_html_ga97242e505dbdc2ee7827cc0db746ffca"><div class="ttname"><a href="group__m__batt__meas.html#ga97242e505dbdc2ee7827cc0db746ffca">m_batt_meas_event_type_t</a></div><div class="ttdeci">m_batt_meas_event_type_t</div><div class="ttdoc">Battery and charge event codes. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:70</div></div>
<div class="ttc" id="group__m__batt__meas_html_gga97242e505dbdc2ee7827cc0db746ffcaa15b80e149f891938b19c579c987fc6fe"><div class="ttname"><a href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa15b80e149f891938b19c579c987fc6fe">M_BATT_MEAS_EVENT_ERROR</a></div><div class="ttdoc">Error state detected signalled by the charger (not implemeted, CHG and CHG finished will toggle in ca...</div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:78</div></div>
<div class="ttc" id="structm__batt__meas__event__t_html_af3bba3b6ab6d11e014929bd6726e21ad"><div class="ttname"><a href="structm__batt__meas__event__t.html#af3bba3b6ab6d11e014929bd6726e21ad">m_batt_meas_event_t::valid_voltage</a></div><div class="ttdeci">bool valid_voltage</div><div class="ttdoc">True if an event is generated by a ADC conversion. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:88</div></div>
<div class="ttc" id="group__m__batt__meas_html_gga97242e505dbdc2ee7827cc0db746ffcaa174cab8a06de89889f665d06608f9cca"><div class="ttname"><a href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa174cab8a06de89889f665d06608f9cca">M_BATT_MEAS_EVENT_LOW</a></div><div class="ttdoc">Low battery event (&lt;= set by user). </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:73</div></div>
<div class="ttc" id="group__m__batt__meas_html_gga0411cd49bb5b71852cecd93bcbf0ca2dac55c4d013f9842ae8b8a145adcbe4d7e"><div class="ttname"><a href="group__m__batt__meas.html#gga0411cd49bb5b71852cecd93bcbf0ca2dac55c4d013f9842ae8b8a145adcbe4d7e">M_BATT_STATUS_CODE_SUCCESS</a></div><div class="ttdoc">Successfull. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:64</div></div>
<div class="ttc" id="structm__ble__service__handle__t_html"><div class="ttname"><a href="structm__ble__service__handle__t.html">m_ble_service_handle_t</a></div><div class="ttdoc">BLE service handle structure. </div><div class="ttdef"><b>Definition:</b> m_ble.h:83</div></div>
<div class="ttc" id="group__m__batt__meas_html_ga3a8f1eaf8376db27cdc7a87946c84c37"><div class="ttname"><a href="group__m__batt__meas.html#ga3a8f1eaf8376db27cdc7a87946c84c37">m_batt_meas_event_handler_t</a></div><div class="ttdeci">void(* m_batt_meas_event_handler_t)(m_batt_meas_event_t const *p_event)</div><div class="ttdoc">m_batt sensor event handler type. Should be implemented by user e.g. in main.c() </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:93</div></div>
<div class="ttc" id="group__m__batt__meas_html_gga97242e505dbdc2ee7827cc0db746ffcaa35441adf890d9265370bcb429a3bc52b"><div class="ttname"><a href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa35441adf890d9265370bcb429a3bc52b">M_BATT_MEAS_EVENT_USB_CONN_CHARGING_FINISHED</a></div><div class="ttdoc">Battery charging finished/not charging. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:76</div></div>
<div class="ttc" id="structm__batt__meas__event__t_html_ab5428192b1c275fe39849bd5296bcf38"><div class="ttname"><a href="structm__batt__meas__event__t.html#ab5428192b1c275fe39849bd5296bcf38">m_batt_meas_event_t::level_percent</a></div><div class="ttdeci">uint8_t level_percent</div><div class="ttdoc">Remaining battery capacity percent. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:87</div></div>
<div class="ttc" id="group__m__batt__meas_html_gga97242e505dbdc2ee7827cc0db746ffcaac213288e1593fe9f62cfb26bf4e63efe"><div class="ttname"><a href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaac213288e1593fe9f62cfb26bf4e63efe">M_BATT_MEAS_EVENT_FULL</a></div><div class="ttdoc">Full battery event (&gt;= value set by user). </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:74</div></div>
<div class="ttc" id="structstate__of__charge__t_html_a77cfde237d402d3004891f26e7023cea"><div class="ttname"><a href="structstate__of__charge__t.html#a77cfde237d402d3004891f26e7023cea">state_of_charge_t::num_elements</a></div><div class="ttdeci">uint16_t num_elements</div><div class="ttdoc">Number of elements in the voltage to state of charge vector. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:109</div></div>
<div class="ttc" id="structbatt__meas__param__t_html_a14f6f056ef9542eb14fe43800f0cd78a"><div class="ttname"><a href="structbatt__meas__param__t.html#a14f6f056ef9542eb14fe43800f0cd78a">batt_meas_param_t::state_of_charge</a></div><div class="ttdeci">state_of_charge_t state_of_charge</div><div class="ttdoc">Information on mapping from voltage to state of charge. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:130</div></div>
<div class="ttc" id="structstate__of__charge__t_html"><div class="ttname"><a href="structstate__of__charge__t.html">state_of_charge_t</a></div><div class="ttdoc">Struct for providing m_batt_meas with information on converting voltage to state of charge (Remaining...</div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:107</div></div>
<div class="ttc" id="structm__batt__meas__event__t_html_a535ad3ffcec3974575eb7e08fcc8ebc2"><div class="ttname"><a href="structm__batt__meas__event__t.html#a535ad3ffcec3974575eb7e08fcc8ebc2">m_batt_meas_event_t::type</a></div><div class="ttdeci">m_batt_meas_event_type_t type</div><div class="ttdoc">Given event type. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:85</div></div>
<div class="ttc" id="structstate__of__charge__t_html_aea6f5da870665e5460e72ba375fe1fd1"><div class="ttname"><a href="structstate__of__charge__t.html#aea6f5da870665e5460e72ba375fe1fd1">state_of_charge_t::first_element_mv</a></div><div class="ttdeci">uint16_t first_element_mv</div><div class="ttdoc">Voltage of the first element in the vector [mV];. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:110</div></div>
<div class="ttc" id="structbatt__meas__param__t_html_a235e3292de0a02e964849b06b8a7d704"><div class="ttname"><a href="structbatt__meas__param__t.html#a235e3292de0a02e964849b06b8a7d704">batt_meas_param_t::adc_pin_no_ain</a></div><div class="ttdeci">nrf_saadc_input_t adc_pin_no_ain</div><div class="ttdoc">Same as above, but given as nrf_saadc_input_t. These two values must correspond. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:122</div></div>
<div class="ttc" id="structbatt__meas__param__t_html"><div class="ttname"><a href="structbatt__meas__param__t.html">batt_meas_param_t</a></div><div class="ttdoc">Input parameters for m_batt_meas. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:118</div></div>
<div class="ttc" id="group__m__batt__meas_html_gga97242e505dbdc2ee7827cc0db746ffcaa85981536414e45d63d487a6f3f033cb8"><div class="ttname"><a href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa85981536414e45d63d487a6f3f033cb8">M_BATT_MEAS_EVENT_USB_DISCONN</a></div><div class="ttdoc">USB disconnected, battery not charging. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:77</div></div>
<div class="ttc" id="structbatt__meas__param__t_html_a8fd3192d7233181b20d89f9e277a7967"><div class="ttname"><a href="structbatt__meas__param__t.html#a8fd3192d7233181b20d89f9e277a7967">batt_meas_param_t::batt_mon_en_pin_used</a></div><div class="ttdeci">bool batt_mon_en_pin_used</div><div class="ttdoc">Indicates if a pin is used to enable battery monitoring. (E.g. activates a voltage divider)...</div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:125</div></div>
<div class="ttc" id="group__m__batt__meas_html_gga97242e505dbdc2ee7827cc0db746ffcaa1ecb97dce4fbd6d2e90f0c457f93d333"><div class="ttname"><a href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa1ecb97dce4fbd6d2e90f0c457f93d333">M_BATT_MEAS_EVENT_USB_CONN_CHARGING</a></div><div class="ttdoc">Battery main og tricle charging active. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:75</div></div>
<div class="ttc" id="structstate__of__charge__t_html_abfc39dcdd555c9753128ba539437797c"><div class="ttname"><a href="structstate__of__charge__t.html#abfc39dcdd555c9753128ba539437797c">state_of_charge_t::voltage_to_soc</a></div><div class="ttdeci">uint8_t const  * voltage_to_soc</div><div class="ttdoc">Pointer to vector mapping from voltage to state of charge. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:112</div></div>
<div class="ttc" id="structbatt__meas__init__t_html"><div class="ttname"><a href="structbatt__meas__init__t.html">batt_meas_init_t</a></div><div class="ttdoc">Init parameters for m_batt_meas. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:135</div></div>
<div class="ttc" id="structbatt__meas__init__t_html_afbb4f0c97d0906f402bae57e4472cf4f"><div class="ttname"><a href="structbatt__meas__init__t.html#afbb4f0c97d0906f402bae57e4472cf4f">batt_meas_init_t::evt_handler</a></div><div class="ttdeci">m_batt_meas_event_handler_t evt_handler</div><div class="ttdoc">Function pointer to the event handler (executed in main context). </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:137</div></div>
<div class="ttc" id="group__m__batt__meas_html_ga822adb8e2120c95c740d244b2bbf4709"><div class="ttname"><a href="group__m__batt__meas.html#ga822adb8e2120c95c740d244b2bbf4709">m_batt_meas_init</a></div><div class="ttdeci">uint32_t m_batt_meas_init(m_ble_service_handle_t *p_handle, batt_meas_init_t const *const p_batt_meas_init)</div><div class="ttdoc">Function for initializing the battery driver. </div></div>
<div class="ttc" id="structstate__of__charge__t_html_a3c599a3aa0d44107e3ca04d19773d32c"><div class="ttname"><a href="structstate__of__charge__t.html#a3c599a3aa0d44107e3ca04d19773d32c">state_of_charge_t::delta_mv</a></div><div class="ttdeci">uint8_t delta_mv</div><div class="ttdoc">Distance in voltage between elements in the SoC vector [mV]. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:111</div></div>
<div class="ttc" id="group__m__batt__meas_html_gga97242e505dbdc2ee7827cc0db746ffcaa4ad836450107533f4c095e501705930d"><div class="ttname"><a href="group__m__batt__meas.html#gga97242e505dbdc2ee7827cc0db746ffcaa4ad836450107533f4c095e501705930d">M_BATT_MEAS_EVENT_DATA</a></div><div class="ttdoc">Is called back at the desired frequency. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:72</div></div>
<div class="ttc" id="structvoltage__divider__t_html"><div class="ttname"><a href="structvoltage__divider__t.html">voltage_divider_t</a></div><div class="ttdoc">Struct for providing m_batt_meas with physical voltage divider information. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:99</div></div>
<div class="ttc" id="structm__batt__meas__event__t_html"><div class="ttname"><a href="structm__batt__meas__event__t.html">m_batt_meas_event_t</a></div><div class="ttdoc">The struct passed to the handler with relevant battery information. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:83</div></div>
<div class="ttc" id="group__m__batt__meas_html_ga36dc9d46d92c054588f99cf2044b1087"><div class="ttname"><a href="group__m__batt__meas.html#ga36dc9d46d92c054588f99cf2044b1087">m_batt_meas_disable</a></div><div class="ttdeci">uint32_t m_batt_meas_disable(void)</div><div class="ttdoc">Function for stopping the battery measurement. </div></div>
<div class="ttc" id="structbatt__meas__param__t_html_a310d12d80f4448fca30df7e26e1224a5"><div class="ttname"><a href="structbatt__meas__param__t.html#a310d12d80f4448fca30df7e26e1224a5">batt_meas_param_t::batt_mon_en_pin_no</a></div><div class="ttdeci">uint8_t batt_mon_en_pin_no</div><div class="ttdoc">Pin for enabling battery monitoring. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:126</div></div>
<div class="ttc" id="structbatt__meas__param__t_html_aeb8fcc57a40fd7458aa6d31549577d82"><div class="ttname"><a href="structbatt__meas__param__t.html#aeb8fcc57a40fd7458aa6d31549577d82">batt_meas_param_t::batt_chg_stat_pin_no</a></div><div class="ttdeci">uint8_t batt_chg_stat_pin_no</div><div class="ttdoc">Pin connected to &quot;Charging status output pin&quot; (CSO) of the battery charger. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:124</div></div>
<div class="ttc" id="structbatt__meas__param__t_html_af749236629b2501099b6261ebe398583"><div class="ttname"><a href="structbatt__meas__param__t.html#af749236629b2501099b6261ebe398583">batt_meas_param_t::usb_detect_pin_no</a></div><div class="ttdeci">uint8_t usb_detect_pin_no</div><div class="ttdoc">Pin = high when USB is connected. </div><div class="ttdef"><b>Definition:</b> m_batt_meas.h:123</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="topicfooter">
<a href="mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback" id="maillink">Documentation feedback</a> | <a href="https://devzone.nordicsemi.com/questions/" target="_blank">Developer Zone</a> | <a href="http://response.nordicsemi.com/subscribe-to-our-newsletters" target="_blank">Subscribe</a> | Updated <span id="date"/>
<script>
var date = new Date("Thu Feb 7 2019" + " UTC");
document.getElementById("date").innerHTML = date.toJSON().slice(0, 10);
var url=window.location.href.split("?")[0];
var filename=url.substring(url.lastIndexOf('/')+1);
document.getElementById("maillink").href = "mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback"+decodeURIComponent("%26")+"body=File%20name%3A%20"+encodeURIComponent(filename);
</script>
</div>
</body>
</html>
